#include "MenuController.h"


MenuController::MenuController() {
	this->setView(new MenuView());
	this->buttonStart = new MenuButtonController(SDLK_s);
	this->buttonStart->setView(this->getView());
}

bool MenuController::loadView(){
	return this->getView()->loadMedia();
}

void MenuController::updateView(){
	this->getView()->update();
}

Controller* MenuController::handleEvent(SDL_Event* event) {
	return buttonStart->handleEvent(event);		
}

/*
 LLamar a cada destructor de los controles compuestos.
*/
MenuController::~MenuController() {
	delete this->buttonStart;
	delete this->getView();
}